# -*- encoding:ascii -*-
from mako import runtime, filters, cache
UNDEFINED = runtime.UNDEFINED
__M_dict_builtin = dict
__M_locals_builtin = locals
_magic_number = 8
_modified_time = 1357472738.176
_enable_loop = True
_template_filename = 'resources/LerneinheitOpen.html'
_template_uri = 'resources/LerneinheitOpen.html'
_source_encoding = 'ascii'
_exports = []


def render_body(context,**pageargs):
    __M_caller = context.caller_stack._push_frame()
    try:
        __M_locals = __M_dict_builtin(pageargs=pageargs)
        lernveranstaltungslist = context.get('lernveranstaltungslist', UNDEFINED)
        markenList = context.get('markenList', UNDEFINED)
        selectedLehrVeranstaltungBezeichner = context.get('selectedLehrVeranstaltungBezeichner', UNDEFINED)
        Lerneinheiten = context.get('Lerneinheiten', UNDEFINED)
        __M_writer = context.writer()
        # SOURCE LINE 1
        __M_writer(u'\r\n\r\n\r\n<h2>Lerneinheiten Informationen</h2>\r\n\r\n<form action="/Lerneinheiten/save" method="post" accept-charset="utf-8">\r\n\r\n')
        # SOURCE LINE 8
        if Lerneinheiten != None:
            # SOURCE LINE 9
            __M_writer(u'\t<label>Nummer</label>\r\n    <input readonly type="text" name="Nummer" value="')
            # SOURCE LINE 10
            __M_writer(unicode(Lerneinheiten.Nummer))
            __M_writer(u'" />\r\n\r\n    <label>Termin</label>\r\n    <input disabled  type="text" name="Termin" value="')
            # SOURCE LINE 13
            __M_writer(unicode(Lerneinheiten.Termin))
            __M_writer(u'" />\r\n')
        # SOURCE LINE 15
        __M_writer(u'\r\n    <label>Bezeichner</label>\r\n')
        # SOURCE LINE 17
        if Lerneinheiten == None or Lerneinheiten.Bezeichner == None:
            # SOURCE LINE 18
            __M_writer(u'            <input type="text" name="Bezeichner" value="" />\r\n')
            # SOURCE LINE 19
        else:
            # SOURCE LINE 20
            __M_writer(u'            <input  type="text" name="Bezeichner" value="')
            __M_writer(unicode(Lerneinheiten.Bezeichner))
            __M_writer(u'" />\r\n')
        # SOURCE LINE 22
        __M_writer(u'\t\t\r\n    <label>Lehrveranstaltung</label>\r\n\r\n    <select name="LVBezeichner" id="Select1" >\r\n')
        # SOURCE LINE 26
        for a in lernveranstaltungslist:
            # SOURCE LINE 27
            if a.Bezeichner == selectedLehrVeranstaltungBezeichner:
                # SOURCE LINE 28
                __M_writer(u'        <option selected="selected" > ')
                __M_writer(unicode(a.Bezeichner))
                __M_writer(u'  </option>\r\n')
                # SOURCE LINE 29
            else:
                # SOURCE LINE 30
                __M_writer(u'        <option> ')
                __M_writer(unicode(a.Bezeichner))
                __M_writer(u'  </option>\r\n')
            # SOURCE LINE 32
            __M_writer(u'\r\n        \r\n')
        # SOURCE LINE 35
        __M_writer(u'    </select>\r\n\r\n    \r\n\r\n\t<button type="submit">Save</button>\r\n\r\n</form>\r\n\r\n<p class="teiler" ></p>\r\n\r\n\r\n')
        # SOURCE LINE 46
        if Lerneinheiten != None:
            # SOURCE LINE 47
            __M_writer(u'\r\n <h2>Abschnitt Erstellen</h2>\r\n        <a href="/Abschnitt/open?LerneinheitNummer=')
            # SOURCE LINE 49
            __M_writer(unicode(Lerneinheiten.Nummer))
            __M_writer(u'">Neuen Abschnitt erstellen</a> \r\n\r\n    <h2>Abschnitt Liste</h2>\r\n    <ul>\r\n')
            # SOURCE LINE 53
            for a in Lerneinheiten.AbschnittList:
                # SOURCE LINE 54
                __M_writer(u'        <li>\r\n            <a href="/Abschnitt/open?LerneinheitNummer=')
                # SOURCE LINE 55
                __M_writer(unicode(Lerneinheiten.Nummer))
                __M_writer(u'&amp;AbschnittBezeichner=')
                __M_writer(unicode(a.Bezeichner))
                __M_writer(u'">')
                __M_writer(unicode(a.Bezeichner))
                __M_writer(u'</a> \r\n            <a href="remove?LerneinheitNummer=')
                # SOURCE LINE 56
                __M_writer(unicode(Lerneinheiten.Nummer))
                __M_writer(u'&amp;AbschnittBezeichner=')
                __M_writer(unicode(a.Bezeichner))
                __M_writer(u'">remove</a> \r\n        </li>\r\n')
            # SOURCE LINE 59
            __M_writer(u'    </ul>\r\n<p class="teiler" ></p>\r\n    <h2>Add Marke</h2>\r\n    <form action="addMarke" method="post" accept-charset="utf-8">\r\n\r\n       <input type="hidden" name="LerneinheitNummer" value="')
            # SOURCE LINE 64
            __M_writer(unicode(Lerneinheiten.Nummer))
            __M_writer(u'" />\r\n        <select name="Bezeichner" >\r\n')
            # SOURCE LINE 66
            for a in markenList:
                # SOURCE LINE 67
                __M_writer(u'                <option> ')
                __M_writer(unicode(a.Bezeichner))
                __M_writer(u'  </option>\r\n')
            # SOURCE LINE 69
            __M_writer(u'        </select>\r\n\r\n        <button type="submit">Add</button>\r\n     </form>\r\n\r\n\r\n\r\n    <h2>Marken Liste</h2>\r\n    <ul>\r\n')
            # SOURCE LINE 78
            for a in Lerneinheiten.MarkenList:
                # SOURCE LINE 79
                __M_writer(u'        <li>\r\n            <label>')
                # SOURCE LINE 80
                __M_writer(unicode(a))
                __M_writer(u'</label>\r\n            <a href="/Marken/open?Bezeichner=')
                # SOURCE LINE 81
                __M_writer(unicode(a))
                __M_writer(u'">Open</a> \r\n            <a href="removeMarke?Bezeichner=')
                # SOURCE LINE 82
                __M_writer(unicode(a))
                __M_writer(u'&amp;LerneinheitNummer=')
                __M_writer(unicode(Lerneinheiten.Nummer))
                __M_writer(u'">Remove</a>\r\n        </li>\r\n')
            # SOURCE LINE 85
            __M_writer(u'    </ul>\r\n\r\n')
        # SOURCE LINE 88
        __M_writer(u'\r\n')
        return ''
    finally:
        context.caller_stack._pop_frame()


